package com.rc.saas.tenant.service.enterprise;

import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.common.vo.TResponse;
import com.rc.saas.tenant.mapper.enterprise.EnterpriseSubmemberMapper;
import com.rc.saas.tenant.model.enterprise.EnterpriseSubmember;
import com.rc.saas.tenant.model.enterprise.EnterpriseSubmemberExample;
import com.rc.saas.tenant.search.enterprise.EnterpriseSubMemberSearch;
import com.rc.saas.tenant.vo.enterprise.EnterPriseSubMemberResult;
import com.rc.saas.tenant.vo.enterprise.EnterpriseSubmemberExportVo;
import com.rc.saas.tenant.vo.enterprise.EnterpriseSubmemberOutResult;
import com.rc.saas.tenant.vo.enterprise.EnterpriseSubmemberVo;

import java.util.List;

/**
 * @author frog
 * @date 2021/2/6
 */
public interface EnterpriseSubmemberService extends BaseService<Long, EnterpriseSubmember, EnterpriseSubmemberExample, EnterpriseSubmemberMapper> {
    TResponse updateStatus(Long memberId);

    TResponse updateLogout(Long memberId);

    /**
     * 还原注销的子会员
     *
     * @param memberId
     * @return
     */
    TResponse updateReductionSubMember(Long memberId);

    TResponse updateRecoveredAmount(Long memberId);

    /**
     * 通过迁移ID查询会员
     */
    EnterpriseSubmember selectEnterpriseSubmemberByMigrateId(String tenantCode, Long migrateId);

    PageInfo<EnterpriseSubmemberOutResult> listLogout(EnterpriseSubMemberSearch enterpriseSubMemberSearch);

    PageInfo<EnterPriseSubMemberResult> searchByCondition(EnterpriseSubMemberSearch enterpriseSubMemberSearch);

    List<Long> listMemberIdByEnterpriseId(String tenantCode, Long enterpriseId);

    List<EnterpriseSubmemberExportVo> listEnterpriseSubmember(EnterpriseSubMemberSearch enterpriseSubMemberSearch);

    EnterpriseSubmember selectMemberByMemberId(Long memberId);

    void updateSubmemberToChannel(List<Long> idList);

    void updateSubmember(EnterpriseSubmember submember, Boolean createUser);
}
